﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WinFormUIXMLParser.ChildForms
{
    public partial class FormManager : Form
    {
        Manager manager;

        public FormManager()
        {       
            InitializeComponent();
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            manager.Show(0);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            manager.Show(1);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            manager.Show(2);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            manager.Hide(0);
        }

        private void button5_Click(object sender, EventArgs e)
        {
            manager.Hide(1);
        }

        private void button6_Click(object sender, EventArgs e)
        {
            manager.Hide(2);
        }

        private void FormManager_Load(object sender, EventArgs e)
        {
            FormChild1 form1 = new FormChild1();
            FormChild2 form2 = new FormChild2();
            FormChild3 form3 = new FormChild3();
            List<Form> list = new List<Form>() { form1, form2, form3 };
            manager = new Manager(list);
        }
    }
}
